package cn.mygweb.admin.modules.settings.controller;

import java.util.Properties;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/** 
* <p>Title: BaseInfoController.java</p>
* <p>Description: 系统基本参数</p>  
* @author gxb 
* @date 2019年7月22日 
* <p>Copyright: Copyright (c) 2019</p>
* <p>Company: www.mygweb.cn</p> 
*/
@RequestMapping("/admin/settings/baseinfo")
@Controller
public class BaseInfoController {

	/**
	 * <p>Title: index</p>
	 * <p>Description: </p>
	 * @param model
	 * @return
	 */
	@RequestMapping("")
	public String index(ModelMap model) {
		Properties props = System.getProperties();
		model.addAttribute("os_name", props.getProperty("os.name"));
		model.addAttribute("os_version", props.getProperty("os.version"));
		model.addAttribute("user_name", props.getProperty("user.name"));
		model.addAttribute("user_home", props.getProperty("user.home"));
		model.addAttribute("user_dir", props.getProperty("user.dir"));
		model.addAttribute("java_version", props.getProperty("java.version"));
		model.addAttribute("java_home", props.getProperty("java.home"));
		model.addAttribute("java_io_tmpdir", props.getProperty("java.io.tmpdir"));
		return "admin/modules/settings/baseinfo.html";
	}
}
